package com.yinhai.util;

import java.util.Map;

import android.content.Context;

import com.yinhai.service.ContactUserServiceImpl;

/**
 * 以电话号码为主键，姓名为Value的键值对
 * @author Administrator
 *
 */
public class PhoneNameMapUtil {

	public static Map<String,String> map = null; 
	
	public static Map<String,String> findPhoneNameMap(Context context) {
		if(map == null) {
			ContactUserServiceImpl c = new ContactUserServiceImpl(context);
			map = c.onlineContactMap();
		}
		return map;
	}
	
	public static String findName(String phone,Context context) {
		return findPhoneNameMap(context).get(phone);
	}
}
